<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%
    List<Map> list = QBuilder.db("basedb").db("basedb").select("new map(id as survey_id, title as title, jsonString as json)").from("Survey").where(new Where("hospital=", hospital).and("status = ", STATUS_ENABLE).and("enable = ", STATUS_ENABLE).and("category=3")).query().getResultObj();
    if (isEmpty(list)) {
        msg = new Message(30041, "暂无相关数据");
        msg.put("data", new ArrayList());
    } else {
        for (int i = 0; i < list.size(); i++) {
            Map map = list.get(i);
            String json = Tools.getDesc(map.remove("json"), "{}");
            Map<String, String> jsonString = JSONUtil.fromJson(json, new TypeReference<Map>(){});
            map.put("icon", jsonString.get("icon"));
        }
        msg.put("data", list);
    }
    Tools.encryptPrint(out, msg);
%>
